Skip to content

feat(admin): activation-aware tabs, readiness badge, activity search, invite copy-link#4308

Merged
PierreBrisorgueil merged 10 commits into
masterfrom
fix/wave5-vue-admin-account-ux
Jun 13, 2026
Merged

feat(admin): activation-aware tabs, readiness badge, activity search, invite copy-link#4308
PierreBrisorgueil merged 10 commits into
masterfrom
fix/wave5-vue-admin-account-ux

Conversation

@PierreBrisorgueil

Copy link
Copy Markdown
Collaborator

Summary

Five admin/account UX follow-ups from the invitations/org hardening tracker, batched (they share the admin.layout / core.surfaceTabBar surfaces so they land in one branch):

src/config/index.js is gitignored (regenerated at build); only the source config fragment changed — the module: 'invitations' field lands in the built config.

Test plan

surface-tabs 37 · core.surfaceTabBar 12 · admin.layout 21 · admin.activity 24 · invitations store 14 / admin 28 / account 25 — all green; lint clean. (2 pre-existing billing v-progress-linear snapshot failures repo-wide are untouched/unrelated.)

Guardrails

  • npm run lint clean
  • Public-OSS clean (downstream-scan CLEAN)
  • Shared-surface changes additive (badge/activation optional)

Closes #4295
Closes #4296
Closes pierreb-devkit/Node#3836
Refs #4297
Refs pierreb-devkit/Node#3834

Tab descriptors may carry an optional 'module' field naming their owning
optional module; resolveSurfaceTabs gains an optional isActive predicate
(default keep-all) that hides tabs whose module is deactivated. Routes are
already gated at injection time — this closes the matching render-time gap
where a baked config tab for a deactivated module clicked through to a 404.

refs #4295
Tag the admin Invitations + account Referrals tab descriptors with
module: 'invitations' and pass isModuleActive as resolveSurfaceTabs'
third argument from CoreSurfaceTabBar (the single call site, so every
surface gets the gate). Regenerates src/config/index.js (gitignored
build artifact). Render-time filtering keeps one source of truth
(isModuleActive) instead of pruning at generation time across the 5
merge layers.

refs #4295
Downstream projects overriding admin.tabs/users.extraTabs must tag
module-owned descriptors with the new module field; tabs without it are
always shown.

refs #4295
The Readiness tab already reports mail-provider status ('mail' readiness
row); the admin layout banner duplicated that signal on every admin tab.
Remove the v-alert + showMailerWarning computed + now-unused useAuthStore
import, and delete the orphan AuthAdminMailerWarning snackbar component
(imported only by its own unit test).

refs #4297
Derive the non-ok readiness check count client-side from the admin store and
decorate the built-in readiness tab descriptor with an optional numeric
badge. CoreSurfaceTabBar renders it as a small tonal warning chip after the
label — additive, tabs without a badge render exactly as before, so the
account and organization surfaces sharing the component are unaffected. The
layout fetches readiness on mount only when the store is empty and skips
entirely when landing on the readiness tab, whose view already fetches on
its own mount (child mounted runs first, so an empty-store check alone
cannot prevent the double GET).

refs pierreb-devkit/Node#3836
Mirror the datatable card-title row on the Activity tab: title + spacer +
Clear action + two compact outlined filter fields, debounced 1000ms like the
datatable search (replaces the enter-key + Search-button flow). Gate the
user-ID filter on a client-side ObjectId check since GET /audit 400s on
malformed userId values; dedupe the trailing debounce so Clear does not
double-fetch. max-width stays a Vuetify prop (no inline styles in this view).

refs #4296
POST /invitations/:id/resend mirroring the create/delete error
contract (sanitized banner + rethrow). Pins createInvitation's return
value as the one-time token source for copy-link: the list endpoint
strips tokens, only the create response carries one.

refs pierreb-devkit/Node#3834
After create the dialog stays open showing the signup link once (the
list payload is token-stripped, the create response is the only token
source) with a clipboard copy button — local label flip, no snackbar
(interceptor-only). Paper-plane resend action on pending rows,
single-flight, toasted by the POST interceptor.

refs pierreb-devkit/Node#3834
Surface the signup link once after create in the account Referrals
form (success alert + clipboard button, local Copied label flip).
Same one-time constraint as the admin dialog: the list payload is
token-stripped, only the create response carries the token.

refs pierreb-devkit/Node#3834
Copilot AI review requested due to automatic review settings June 13, 2026 16:55
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@PierreBrisorgueil, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 42 minutes and 55 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 44f86c3f-2ae1-4d74-8148-ee0cb53e5354

📥 Commits

Reviewing files that changed from the base of the PR and between e70dbf7 and 089609a.

📒 Files selected for processing (18)
  • MIGRATIONS.md
  • src/lib/helpers/surface-tabs.js
  • src/lib/helpers/tests/surface-tabs.unit.tests.js
  • src/modules/admin/tests/admin.activity.view.unit.tests.js
  • src/modules/admin/tests/admin.layout.unit.tests.js
  • src/modules/admin/views/admin.activity.view.vue
  • src/modules/admin/views/admin.layout.vue
  • src/modules/auth/components/auth.adminMailerWarning.component.vue
  • src/modules/auth/tests/auth.adminMailerWarning.component.unit.tests.js
  • src/modules/core/components/core.surfaceTabBar.component.vue
  • src/modules/core/components/tests/core.surfaceTabBar.component.unit.tests.js
  • src/modules/invitations/config/invitations.development.config.js
  • src/modules/invitations/stores/invitations.store.js
  • src/modules/invitations/tests/invitations.account.view.unit.tests.js
  • src/modules/invitations/tests/invitations.admin.view.unit.tests.js
  • src/modules/invitations/tests/invitations.store.unit.tests.js
  • src/modules/invitations/views/invitations.account.view.vue
  • src/modules/invitations/views/invitations.admin.view.vue
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wave5-vue-admin-account-ux

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.59%. Comparing base (e70dbf7) to head (089609a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4308   +/-   ##
=======================================
  Coverage   99.59%   99.59%           
=======================================
  Files          32       32           
  Lines        1225     1234    +9     
  Branches      361      363    +2     
=======================================
+ Hits         1220     1229    +9     
  Misses          5        5           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR batches several Admin/Account UX follow-ups around shared “surface tab” infrastructure: tabs now respect optional-module activation at render time, Admin readiness gets a warning-count badge, Admin Activity search/filters are moved into the standard card-title layout with debounced fetching, and Invitations gain a one-time copy-link flow plus a resend action (while removing the redundant admin mailer banner/component).

Changes:

  • Add activation-aware surface-tab filtering via resolveSurfaceTabs(..., isActive) and propagate it through CoreSurfaceTabBar (with invitations tabs tagged as module-owned).
  • Add an optional per-tab numeric badge rendered by CoreSurfaceTabBar, and decorate the Admin Readiness tab using readiness data fetched by admin.layout.
  • Improve Invitations UX (one-time copy-link + resend) and restyle Admin Activity with debounced card-title filters; remove the deprecated mailer warning banner/component.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/modules/invitations/views/invitations.admin.view.vue Adds resend action and one-time copy-link panel after invite creation.
src/modules/invitations/views/invitations.account.view.vue Adds one-time copy-link success block after invite creation on the account referrals surface.
src/modules/invitations/tests/invitations.store.unit.tests.js Adds unit coverage for create token contract and resendInvitation behavior.
src/modules/invitations/tests/invitations.admin.view.unit.tests.js Adds tests for admin copy-link + resend behaviors (clipboard mock included).
src/modules/invitations/tests/invitations.account.view.unit.tests.js Adds tests for account copy-link behavior (clipboard mock included).
src/modules/invitations/stores/invitations.store.js Adds resendInvitation() and clarifies create response includes one-time token.
src/modules/invitations/config/invitations.development.config.js Tags invitations-contributed tabs with module: 'invitations' for activation filtering.
src/modules/core/components/tests/core.surfaceTabBar.component.unit.tests.js Adds tests for optional tab badge rendering.
src/modules/core/components/core.surfaceTabBar.component.vue Passes isModuleActive into resolveSurfaceTabs and renders optional badge chip.
src/modules/auth/tests/auth.adminMailerWarning.component.unit.tests.js Removes tests for deleted admin mailer warning component.
src/modules/auth/components/auth.adminMailerWarning.component.vue Deletes the orphaned mailer warning snackbar component.
src/modules/admin/views/admin.layout.vue Removes mailer banner; fetches readiness for tab badge; decorates Readiness tab with badge.
src/modules/admin/views/admin.activity.view.vue Moves filters into card-title layout; adds 1s debounce and ObjectId gating for userId filter.
src/modules/admin/tests/admin.layout.unit.tests.js Updates expectations: no mailer banner; readiness fetch + readiness badge behavior.
src/modules/admin/tests/admin.activity.view.unit.tests.js Adds tests for debounced filter behavior and updated card-title chrome.
src/lib/helpers/tests/surface-tabs.unit.tests.js Adds tests for module-activation filtering parameter.
src/lib/helpers/surface-tabs.js Extends resolveSurfaceTabs with optional activation predicate and module filtering.
MIGRATIONS.md Documents activation-aware surface tab filtering change and downstream action items.

Comment thread src/modules/invitations/views/invitations.admin.view.vue Outdated
Comment thread src/modules/invitations/views/invitations.account.view.vue Outdated
Comment thread src/modules/invitations/views/invitations.admin.view.vue
Comment thread src/modules/invitations/views/invitations.admin.view.vue
… jsdoc

- encodeURIComponent(token) in signupLink() on both admin + account views
- aria-label="Resend invitation" on the icon-only resend button (a11y)
- correct resendInvite() jsdoc: global in-flight guard, not per-row
@PierreBrisorgueil PierreBrisorgueil merged commit da419ac into master Jun 13, 2026
7 checks passed
@PierreBrisorgueil PierreBrisorgueil deleted the fix/wave5-vue-admin-account-ux branch June 13, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants